class CreateOrderMadePayments < ActiveRecord::Migration
  def self.up
    create_table :order_made_payments do |t|
      t.integer :order_item_id
      t.integer :order_made_id
      t.decimal :how_much,
        :default => 0,
        :precision => 8, :scale => 2
      t.string :feed_id
      t.integer :updated_by_user_id
      t.text :remark
      t.timestamps
    end
    add_column :feeds, :order_made_payment_id, :integer
  end

  def self.down
    drop_table :order_made_payments
    remove_column :feeds, :order_made_payment_id
  end
end
